package com.atguigu.order.feign.fallback;
import java.math.BigDecimal;

import com.atguigu.order.feign.OrderFeignClient;
import com.atguigu.product.bean.Product;
import org.springframework.stereotype.Component;

@Component
public class OrderFeignClientFallback implements OrderFeignClient {
    @Override
    public Product getProduct(Long productId) {
        System.out.println(" Feign 兜底回调 ");
        Product product = new Product();
        product.setId(0L);
        product.setName("未知商品");
        product.setPrice(new BigDecimal("0"));
        product.setNum(0);

        return product;
    }
}
